#注意1：创建元素的括号在没有歧义的情况下可以不写
tuple_week = "星期一","星期二","星期三"
print(tuple_week)
#注意2：如果元组中只有一个元素，必须要加逗号
tuple_number = (10)
print(type(tuple_number))
#注意3：序列拆包
a,b,c = tuple_week
a1,b1,c1 = ["A","B","C"]
a2,b2,c2 = "孙悟空"
print(a)
print(b)
print(c)
print(a1)
print(b1)
print(c1)
print(a2)
print(b2)
print(c2)

name = "张无忌"
names = ["赵敏","周芷若"]
tuple01 = ("张翠山",name,names)
name = "无忌哥哥"
tuple01[2][0] = "敏儿"
print(tuple01)

#存多个东西优先使用元组，元组不可变占用内存小，列表可变占用内存大
month = int(input("请输入月份："))
if 1 <= month <= 12:
    if month ==2:
        print("29天")
    elif month in (4,6,9,11):
        print("30天")
    else:
        print("31天")
#使用元组存储天数
month1 = int(input("请输入月份："))
tuple_days = (31,29,31,30,31,30,31,31,30,31,30,31)
print(month1-1)


input_month = int(input("请输入月份："))
input_day = int(input("请输入日："))
tuple_month_days = (31,29,31,30,31,30,31,31,30,31,30,31)
days = 0
if input_month == 1:
    days = input_day
else:
    for i in range(input_month-1):
        days += tuple_month_days[i]

    days += input_day
print(days)

print(range(1,input_month))
print(range(input_month-1))


